package com.sdy.service;

import com.alibaba.fastjson.JSONObject;
import com.sdy.dao.mysql.NoticMapper;
import com.sdy.po.Notic;
import com.sdy.po.Parm;
import com.sdy.utils.NoticUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class NoticServiceImpl implements NoticService {

    @Autowired
    NoticUtil noticUtil;
    @Resource
    NoticMapper noticMapper;

    @Override
    public void insertNotic(Notic notic) {

    }

    @Override
    public Notic getOneById(Integer noticId) {
        return null;
    }

    @Override
    public List<Notic> getListByCompanyId(Integer companyId) {
        return null;
    }

    public void insertNotic(String dataState, Integer companyId, Parm parm, JSONObject data){
        noticMapper.insertNotic(noticUtil.dataToNotic(dataState,companyId,parm,data));
    }
}
